﻿using System;
using System.Collections.Generic;
using System.ServiceModel;

namespace LLServer
{
    public interface IPortalCallback
    {
        [OperationContract(IsOneWay = true)]
        void RefreshClient(List<Client> clients);

        [OperationContract(IsOneWay = true)]
        void RefreshAvailableUser(List<Client> clients);

        [OperationContract(IsOneWay = true)]
        void ReceiveMessage(Chat.Message message);

        [OperationContract(IsOneWay = true)]
        void ReceiveWhisper(Chat.Message message);

        [OperationContract(IsOneWay = true)]
        void ReceiveNotifyClientConnect(Client joinedClient);

        [OperationContract(IsOneWay = true)]
        void ReceiveNotifyClientDisconnect(Client leaver);

        [OperationContract(IsOneWay = true)]
        void NotifySendChallange(bool isSent);

        [OperationContract(IsOneWay = true)]
        void NotifyReceiveChallange(Client challanger);

        [OperationContract(IsOneWay = true)]
        void NotifyChallangeRespond(Client sender, bool respond);

        [OperationContract(IsOneWay = true)]
        void NotifyBattleCreation(Chat.Message message);

        [OperationContract(IsOneWay = true)]
        void NotifyPlacementDone(Client sender);

        [OperationContract(IsOneWay = true)]
        void NotifyPlayerReady(Client sender);

        [OperationContract(IsOneWay = true)]
        void ReceiveGameStarted(Chat.Message message);

        [OperationContract(IsOneWay = true)]
        void NotifyPauseBattle(Client sender, Battle.Turn turn);

        [OperationContract(IsOneWay = true)]
        void NotifyResumeBattle(Client sender, Battle.Turn turn);

        [OperationContract(IsOneWay = true)]
        void ReceiveShotResult(Chat.Message message);

        [OperationContract(IsOneWay = true)]
        void NotifyGotShot(Client sender, Battle.Turn turn);

        [OperationContract(IsOneWay = true)]
        void NotifyBattleOver(Chat.Message message);

        [OperationContract(IsOneWay = true)]
        void NotifyEnemyClientAndMe(Client enemy, Client you, Dictionary<int, int> enemyShips, Dictionary<int, int> yourShips);

        [OperationContract(IsOneWay = true)]
        void NotifyStatistic(List<Data.BattleReport> battleStats, List<Data.CptStats> captainStats, 
            List<Data.FractionStats> fractionStats, List<Data.Captain> captains);
    }
}
